Skip to content

Conversation

@YaLTeR
Copy link
Owner

@YaLTeR YaLTeR commented Jun 4, 2025

When a recent enough (with this PR) xwayland-satellite is detected, niri will create the X11 sockets and set DISPLAY, then automatically spawn xwayland-satellite when an X11 client tries to connect. If Xwayland dies, niri will keep watching the X11 socket and restart xwayland-satellite as needed. This is very similar to how built-in Xwayland works in other compositors.

How to test:

  1. Install niri with this PR and xwayland-satellite with that PR.
  2. Remove any manual spawn-at-startup "xwayland-satellite" and environment { "DISPLAY": ":0"; }.
  3. It should just work. Start niri, open some X11 app. Try killing xwayland-satellite or Xwayland, then open some X11 app again.

@two-horned

This comment was marked as resolved.

@two-horned
Copy link
Contributor

It is just my personal opinion, but I really like how you can control whether or not you have a xorg-server running or not.

From what I see in the commit, you already have a setting that control the desired behavior 👍

@YaLTeR
Copy link
Owner Author

YaLTeR commented Jun 5, 2025

Yes, you can disable it with xwayland-satellite { off; }

@YaLTeR YaLTeR enabled auto-merge (rebase) June 7, 2025 20:03
@YaLTeR YaLTeR merged commit f918eab into main Jun 7, 2025
24 checks passed
@YaLTeR YaLTeR deleted the space-launch branch June 7, 2025 20:15
@Stzx
Copy link

Stzx commented Jun 8, 2025

Will there be support for set additional parameters for xwayland-satellite? (e.g. -rootless), or is this left to xwayland-satellite { off; }?

@YaLTeR
Copy link
Owner Author

YaLTeR commented Jun 8, 2025

There are no additional parameters. xwayland-satellite does not support any arguments.

@Stzx
Copy link

Stzx commented Jun 9, 2025

There are no additional parameters. xwayland-satellite does not support any arguments.

Aha, now that you mention it, I went back to look.

I had only been passing one parameter all along, whereas this position in the code should have been reserved for display.

I accidentally used it for parameter passing, relying on a "bug" to run.......

https://github.com/Supreeeme/xwayland-satellite/blob/da2ecb5be816de35e2efe23a408a1c49fe8b11ba/src/main.rs#L62

https://github.com/Supreeeme/xwayland-satellite/blob/da2ecb5be816de35e2efe23a408a1c49fe8b11ba/src/lib.rs#L71-L73

@YaLTeR
Copy link
Owner Author

YaLTeR commented Jun 9, 2025

Pretty sure that shouldn't let you pass any extra parameters.

Either way, you're not supposed to pass any custom parameters to Xwayland on any WM that integrates with it. xwl-s already passes -rootless on its own

@IVKLD
Copy link

IVKLD commented Jun 10, 2025

Extremely odd decision to include xwayland in the best wayland composer. People won't start using wayland 100% unless you force them to use wayland. They will continue to use xorg software if they don't stop boycotting xorg. I would like to make it so that niri can be built without mentioning xorg.

@YaLTeR
Copy link
Owner Author

YaLTeR commented Jun 10, 2025

Well I don't see Steam finally switching to Wayland because some obscure WM doesn't run Xwayland out of the box. So no, the only outcome of niri not integrating some Xwayland out of the box is that it's harder and more annoying for new users, and detracts people from trying niri.

If you don't like it you can turn it off in the config, then it will do nothing (exactly the same as before this PR). Or just not install xwayland-satellite. If you really don't like it, it's easy enough to patch out.

@IVKLD
Copy link

IVKLD commented Jun 10, 2025

No complaints then, if you can cut out xwayland. I fear for niri, as it is the only good product a product one uses and is happy with. No problems have been observed.

@YaLTeR
Copy link
Owner Author

YaLTeR commented Jun 10, 2025

Note also that there's no trace of Xwayland in niri itself. All this code is doing is creating X11 sockets and spawning xwayland-satellite

@abdeoliveira
Copy link

Extremely odd decision to include xwayland in the best wayland composer. People won't start using wayland 100% unless you force them to use wayland. They will continue to use xorg software if they don't stop boycotting xorg. I would like to make it so that niri can be built without mentioning xorg.

Could not disagree more. In the current state of affairs it is impossible to live without x11 applications in a normal production environment. For many people (me included), niri without the xwayland-sattellite support would be impracticable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants